package com.yupi.project.model.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 接口状态
 *
 */
public enum InterfaceInfoStatusEnum {
    ONLINE(0,"上线"),
    OFFLINE(1,"下线");

    public int getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }

    private final int status;
    private final String message;
    InterfaceInfoStatusEnum(int status,String message){
        this.status = status;
        this.message = message;
    }
    /**
     * 获取值列表
     *
     * @return
     */
    public static List<Integer> getValues() {
        return Arrays.stream(values()).map(item -> item.status).collect(Collectors.toList());
    }

}
